#!/usr/bin/env python
#code=utf-8
g_DBConnectionStr = 'mssql://sa:Uygh6326@SKYWALKER-BRUCE/SkyWalkerDB'
g_host = 'SKYWALKER-BRUCE'
g_db = 'SkyWalkerDB'
g_user = 'sa'
g_pwd = 'Uygh6326'
skyUserInfoTable = None
skyUserRelationTable = None
skySceneTable = None
LocalUserInfoTable = None
skyUserPhoneTable = None
LocalUserInfoTable_bak1 = None
skySceneTable_bak1 = None
skyUserPhoneObj_bak1 = None
skyUserVOIPTable = None
skyUserVOIPOrderTable = None
VOIPInfoTable = None
phoneSegTable = None
class skyUserInfoObj(object):
    def __init__(self):
        #self.userID = 0
        self.accounts = ""
        self.password = ""
        self.nickName = ""
        self.email = ""
        self.address = ""
        self.myUrl = ""
        self.myPhoto = None
        self.imTool = ""
        self.sceneID = -1
        self.totalFrequency = 0
        self.remark = ""
        self.modifyTime = 0
        self.searchmsg = ""
    def __repr__(self):
        return "%s(%r)"%(
            self.__class__.__name__, self.accounts)

class skyUserRelationObj(object):
    def __init__(self):
        self.userID = 0
        self.friendID = 0
        self.friendNickName = ""
        self.friendSceneID = -1
    def __repr__(self):
        return "%s"%(self.__class__.__name__)
        
class skySceneObj(object):
    def __init__(self):
        self.userID = 0
        self.sceneID = -1
        self.phoneIndex = -1
        self.sceneName = ""
        self.touchFrequency = 0
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 

class skySceneObj_bak1(object):
    def __init__(self, other):
        self.userID = other.userID
        self.sceneID = other.sceneID
        self.phoneIndex = other.phoneIndex
        self.sceneName = other.sceneName
        self.touchFrequency = other.touchFrequency
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 

class LocalUserInfoObj(object):
    def __init__(self):
        self.skyUserID = 0
        #self.userID = 0
        self.accounts = ""
        self.password = ""
        self.nickName = ""
        self.email = ""
        self.address = ""
        self.myUrl = ""
        self.myPhoto = None
        self.imTool = ""
        self.sceneID = -1
        self.totalFrequency = 0
        self.remark = ""
        self.modifyTime = 0
        self.searchmsg = ""
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 

class LocalUserInfoObj_bak1(object):
    def __init__(self, other):
        self.skyUserID = other.skyUserID
        self.userID = other.userID
        self.accounts = other.accounts
        self.password = other.password
        self.nickName = other.nickName
        self.email = other.email
        self.address = other.address
        self.myUrl = other.myUrl
        self.myPhoto = other.myPhoto
        self.imTool = other.imTool
        self.sceneID = other.sceneID
        self.totalFrequency = other.totalFrequency
        self.remark = other.remark
        self.modifyTime = other.modifyTime
        self.searchmsg = other.searchmsg
        self.uid = other.uid
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 

class skyUserPhoneObj(object):
    def __init__(self):
        self.userID = 0
        self.phoneIndex = -1
        self.phoneNum = ""
        self.description =""
    def __repr__(self):
        return "%s(userID = %r, phoneIndex = %r, phoneNum = %r, decription = %r)"%(self.__class__.__name__, self.userID, self.phoneIndex, self.phoneNum, self.description) 

class skyUserPhoneObj_bak1(object):
    def __init__(self, other):
        self.userID = other.userID
        self.phoneIndex = other.phoneIndex
        self.phoneNum = other.phoneNum
        self.description =other.description
    def __repr__(self):
        return "%s(userID = %r, phoneIndex = %r, phoneNum = %r, decription = %r)"%(self.__class__.__name__, self.userID, self.phoneIndex, self.phoneNum, self.description) 
class skyUserVOIPObj(object):
    def __init__(self):
        self.userID = 0
        self.voipID = 0
        self.voipIndex = 0
        self.touchFrequency = 0
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 
    
class skyUserVOIPOrderObj(object):
    def __init__(self):
        self.userID = 0
        self.isOrder = 0
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 
    
class VOIPInfoObj(object):
    def __init__(self):
#        self.voipIndex = 0
        self.voip = ""
        self.remark = ""
        self.touchFrequency = 0
        self.phoneProvider = 0
        self.voipName = ""
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 
#class deviceInfoObj(object):
#    def __init__(self):
#        self.userID = 0
#        self.deviceInfo = ""
#    def __repr__(self):
#        return "%s"%(self.__class__.__name__) 
    
class phoneSegObj(object):
    def __init__(self):
        self.phoneSeg = ""
        self.provinceID = 0
        self.cityID = 0
        self.phoneProvider = 0
    def __repr__(self):
        return "%s"%(self.__class__.__name__) 
class skyTotalUserCountObj(object):
    def __init__(self):
        self.Total = 0
    def __repr__(self):
        return "Total:%s" %(self.Total)

##class DB
